package com.itheima.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zhanliuzhu
 * @date 2023/11/21
 * @Description
 */
@Component
public class InterceptorConfig implements WebMvcConfigurer {

    @Autowired
    Handleinterceptor handleinterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //添加
        registry.addInterceptor(handleinterceptor);

    }
}